﻿<%@ Page Title="Log" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="crm_log.aspx.cs" Inherits="Sami_SMS_CRM_UI.crm_log" %>
<%@ Register Src="UserControl/ucPaging.ascx" TagName="ucPaging" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CssContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="box">
        <div class="box-title clearfix">
            <div class="fl">
                List of Log
            </div>
            <div class="fr">
                <asp:ImageButton ID="btnClear" runat="server" ImageUrl="~/img/icons/ws/ic_cancel.png"
                    ToolTip="Clear all log" onclick="btnClear_Click" OnClientClick="return confirm('Are you sure clear all log?');" />
            </div>
        </div>
        <div class="box-content">
            <div class="clearfix" style="height: 32px">
                <div class="fl">
                    Show
                    <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                        <asp:ListItem Value="5">5</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="50" Selected="True">50</asp:ListItem>
                        <asp:ListItem Value="100">100</asp:ListItem>
                        <asp:ListItem Value="150">150</asp:ListItem>
                        <asp:ListItem Value="200">200</asp:ListItem>
                    </asp:DropDownList> / 
                    <asp:Literal ID="ltrTotalRow" runat="server" Text="0" /> 
                    entries
                </div>
                <div class="fr">
                    <uc1:ucPaging ID="pagingtop" runat="server" />
                </div>
            </div>
            <div class="clearfix">
                <table class="table" style="width: 100%;">
                    <thead>
                        <tr>
                            <th style="width: 35px">
                                No
                            </th>
                            <th style="width: 145px">
                                Log message
                            </th>
                            <th>
                                Log source
                            </th>
                            <th>
                                Log stack trace
                            </th>
                            <th style="width: 100px">
                                Log time
                            </th>
                            <th>
                                enabled
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="rptTable" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td style="text-align: center">
                                        <%#(Container.ItemIndex +1) + (pagingtop.CurrentPage - 1) * pagingtop.PageSize %>
                                    </td>
                                    <td>
                                        <%#Eval("log_message")%>
                                    </td>
                                    <td>
                                        <%#Eval("log_source")%>
                                    </td>
                                    <td>
                                        <%#Eval("log_stack_trace")%>
                                    </td>
                                    <td>
                                        <%#Eval("log_time")%>
                                    </td>
                                    <td>
                                        <%#Eval("enabled")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
                <div class="fr">
                    <uc1:ucPaging ID="pagingbottom" runat="server" />
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" id="formId" value="crm_log" />
</asp:Content>
